import random

with open('ips.txt', 'a') as fp:
    for i in range(120000):
        fp.write(f'172.25.254.{random.randint(1, 255)}/24\n')

fp = open('ips.txt', 'r')
fp.seek(0)
lst = fp.readlines()
lst2 = []
for i in range(1, 256):
    total = lst.count(f'172.25.254.{i}/24\n')
    lst2.append(f'({total},"172.25.254.{i}/24")')

lst2.sort(reverse=True)
for i in range(10):
    print(lst2[i])
